// POJ 2187
#include <cstring>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
using namespace std;

const int N = 50009;
typedef int Type;

struct Point
{
	Type x, y;
};

int n;
Point ps[N];
int top;
Point st[N];

bool cmp(const Point &a, const Point &b)
{
	if (a.y != b.y)
		return a.y < b.y;
	return a.x < b.x;
}

bool scmp(const Point &a, const Point &b)
{
	int xa = a.x - ps[0].x, ya = a.y - ps[0].y;
	int xb = b.x - ps[0].x, yb = b.y - ps[0].y;
	int cp = xa * yb - xb * ya;
	if (cp != 0)
		return cp > 0;
	if (a.y != b.y)
		return a.y < b.y;
	return abs(ps[0].x - a.x) < abs(ps[0].x - b.x);
}

void getConvexHull()
{
	top = -1;
	int p = min_element(&ps[0], &ps[n], cmp) - ps;
	swap(ps[0], ps[p]);
	sort(&ps[1], &ps[n], scmp);
	memcpy(st, ps, sizeof(Point) * 3);
	top = 2;
	for (int i = 3; i < n; ++i)
	{
		while (top >= 1) // all points are all in a line
		{
			int xa = st[top].x - st[top - 1].x, ya = st[top].y - st[top - 1].y;
			int xb = ps[i].x - st[top - 1].x, yb = ps[i].y - st[top - 1].y;
			int cp = xa * yb - xb * ya;
			if (cp > 0) break;
			--top;
		}
		st[++top] = ps[i];
	}
}

int main()
{
	scanf("%d", &n);
	for (int i = 0; i < n; ++i)
		scanf("%d%d", &ps[i].x, &ps[i].y);
	getConvexHull();
	int res = 0;
	for (int i = 0; i <= top; ++i)
		for (int j = i + 1; j <= top; ++j)
		{
			res = max(res, (st[i].x - st[j].x) * (st[i].x - st[j].x) + (st[i].y - st[j].y) * (st[i].y - st[j].y));
		}
	printf("%d", res);
	return 0;
}

